<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>hongmo</title>
		<link rel="stylesheet" type="text/css" href="../css/hongmo.css"/>
		<link rel="stylesheet" type="text/css" href=""/>
		<!-- <link rel="stylesheet" type="text/css" href="../download/font_2699111_c8n197sv6k/iconfont.css"/> -->
	</head>
	<body>
		<div class="heade"></div>
		<div class="banner">
			<img src="../img/hongmo/60b0486ca70aa23.jpg" >
			<img src="../img/hongmo/6057ed085b2b532.jpg" >
			<img src="../img/hongmo/6040d0401a2714.jpg" >
			<img src="../img/hongmo/60af50806ba9c67.jpg" >
			<img src="../img/hongmo/6040d0401a2714.jpg" >
		</div>
		<div class="xuan">
			<p>配件
				<span><a href="#">所有</a>
				<a href="#">腾讯红魔游戏手机6R</a>
				<a href="#">红魔6 Pro</a>
				<a href="#">红魔6</a></span>
			</p>
		</div>
		<div class="choo">
			<ul id="hot-box">
				<!-- <img src="../img/hongmo/161534769179.png" > -->
			</ul>
		</div>
		<div class="foot"></div>
	</body>
</html>
<script src="../js/jquery.js"></script>
<script type="text/javascript">
	$(".heade").load("header1.html");
	$(".foot").load("footer.html");
	
	
	function getHotGoods(){
		$.get("../php/getGoodsListNew.php?typeId=001&count=4",function(data){
			let goodsList=JSON.parse(data);
			console.log(goodsList);
			let htmlStr='';
				goodsList.forEach(goods=>{
					htmlStr +=`
					<li onclick="location.href='shuanghe.html?${goods.goodsId}'">
						<img src="${goods.goodsImg}">
						<p>${goods.goodsName}</p>
						<h3>${goods.goodsPrice}</h3>
						
						<span>￥${goods.goodsDesc}</span>
					</li>
					`;
				});
				// console.log(htmlStr);
				$('#hot-box').html(htmlStr);
		})
	}
	$(function(){
		getHotGoods();
	})
	
</script>